<?php

namespace App\Http\Controllers\admin;

use App\Dao\OrdersDao;
use App\Services\Code;

class OrdersController extends BaseController
{
    public function orders()
    {
        if(getIsHasPage()){
            return Code::message('',200,OrdersDao::orders(request()->all()));
        }
        return view('admin.orders.orders');
    }

    public function send_orders()
    {
        if(isPost()){
            $params = request()->post();
            OrdersDao::send_orders($params);
            return Code::message('',200);
        }
        return view('admin.orders.send_orders',[
            'orders_id'=>request('orders_id')
        ]);
    }

}
